1. Field of Invention
This invention relates generally to processing compressed digital images. More particularly, this invention is directed to methods and apparatus for incorporating decoding commands into a compressed image data file to complement processing performed in the compressed domain to reduce computation time for imaging operations.
2. Description of Related Art
Data compression is required in data handling processes, where too much data is present for practical applications using the data. Commonly, compression is used in communication links to reduce the transmission time or required bandwidth. Similarly, compression is preferred in image storage systems, including digital printers and copiers, where xe2x80x9cpagesxe2x80x9d of a document to be printed are stored temporarily in precollation memory. The amount of media space on which the image data is stored can be substantially reduced with compression. Generally speaking, scanned images, i.e., electronic representations of printed documents, are often large, and thus make desirable candidates for compression.
This invention is directed to reducing computation time for imaging operations that alter the appearance of the original image. In particular, this invention introduces decoding commands into a compressed image data file. These commands are instructions carried along to the decompressor and complement processing performed in the compressed domain. The commands, possibly along with original image parameters, instruct the decompressor to alter the appearance of the decoded image relative to the original image. Then, the decompressor performs some processing steps to the data while decompressing it. This results in reduced computation time for the image operations.
One aspect of this invention deals with a basic problem in the frequent use of compressed image buffersxe2x80x94the inability to process image data without performing expensive decompression and recompression operations. To make processing in the compressed domain more accessible, the compression format/methodology according to this invention preferably generates compressed data in such a way that a predetermined amount of data corresponds to a predetermined number of pixels in the image. If this condition holds, image regions in the compressed data can be easily identified, replaced or cropped. One preferred embodiment of this invention includes a method for compressing an image and a syntax for decoding commands that allows some image processing operations to be easily applied in the compressed domain.
A preferred embodiment of the system and method of this invention works particularly well for compression schemes such as vector quantization (VQ). In vector quantization, a group of pixels is quantized at the same time by representing the group as a code vector. The image data are first processed into sets of vectors. A codebook that best matches the data to be quantized is then generated. Each input vector is then quantized to the closest codeword. Compression is achieved by transmitting only the indices for the codewords. At the receiver, the images are reconstructed using a table look-up procedure.
In a preferred embodiment of the system and method of this invention, both the coder and the decoder share codebooks. In this embodiment, the codewords take the form of auxiliary data, and the compressed image data is generated based on the auxiliary data. The encoding indices of the auxiliary data are transmitted, and from these encoding indices, the decoder looks up a set of pixels. Thus, to process the compressed image, a decoding command can be incorporated into the compressed image data file. The decompressor that receives the decoding commands understands the commands and executes them over the codebook entries and/or the compressed image data. The auxiliary data is processed based on the decoding commands. The decoding of the compressed image data is based on the processed auxiliary data. The image is decompressed normally because the codebook entries are irrelevant for the decoding process, as long as the correspondence between the indices and the codebook entries is maintained.
Accordingly, the method and system of this invention can apply any number of operations to the compressed data, including TRC mapping, bit-depth conversion, resizing, rotation, mirroring, transposition, halftoning, cropping, pasting and merging. The system of this invention can include a data or image processing system able to compress and/or decompress an image. The method and system described herein are advantageous because they result in reduced computation time for imaging operations.
These and other features and advantages of this invention are described in or are apparent from the following detailed description of the preferred embodiments.